*{
  top: 0;
  bottom: 0;
  font-family: sans-serif;
  box-sizing: border-box;
}
header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgb(0, 0, 255);
  box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.1);
  position: fixed;
  padding: 1rem;
  width: 100%;
  height: 10%;
  position: sticky;
  z-index: 1000;
}
.logo{
  max-width: 5rem;
  cursor: pointer;
}
.nav-list{
  display: flex;
  gap: 2vw;
  list-style-type: none;
}
.nav-list li a{
  text-decoration: none;
  color: white;
}
.nav-list li a:hover{
    color: rgb(255, 0, 0, 0.6);
    text-decoration: underline;
}
.abrir-menu,
.cerrar-menu{
  display: none;
}

@media screen and (max-width: 550px) {
  .abrir-menu,
  .cerrar-menu{
    display :block;
    border: 0;
    font-size: 2rem;
    background-color: transparent;
    cursor: pointer;

  }
  .nav{
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: end;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(38, 0, 255);
    padding: 2rem;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
  }
  .nav.visible{
    opacity: 1;
    visibility: visible;
  }
  .nav-list{
    margin-top: 45px;
    gap: 1rem;
    flex-direction: column;
    align-items: end;
  }
  .nav-list li a:hover{
    color: rgb(255, 0, 0, 0.6);
    text-decoration: underline;
  }
  .lista{
    margin-top: 37px;
  }
  .div3 h1 {
    padding: 1rem;
    font-size: 1.5rem;
    display: flex;
    width: auto;
    justify-content: center;
}
  footer{
    font-size: 12px;
  }
  .toggle-btn{
    font-size: 12px;
  }
}



.parent {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    height: 100vh;
    width: 100%;
}
    
.div1 {
    display: flex;
    flex-direction: end;
    justify-content: center;
    align-items: center;
    grid-column: span 3 / span 3;
    grid-row: span 5 / span 5;
    grid-column-start: 1;
    grid-row-start: 2;
    
}
.div1 img {
    view-timeline-name: --image;
    view-timeline-axis: block;
    animation-timeline: --image;
    animation-name: show;
    animation-range: entry 87% cover 55%;
    animation-fill-mode: both;
    max-width: 100%;
    max-height: 100%;
    top: 0;
}
.div2 {
    view-timeline-name: --image;
    view-timeline-axis: block;
    animation-timeline: --image;
    animation-name: show;
    animation-range: entry 70% cover 60%;
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
    grid-row: span 5 / span 5;
    grid-column-start: 4;
    grid-column-end: 6;
    grid-row-start: 3;
    top: 0;
}
.div2 h1{
  text-decoration: underline;
  font-family: monospace;
  font-weight: bolder;
}
.nombre{
  font-family: monospace;
  color: blue;
  font-weight: bolder;
}
.nombre:hover{
  color: rgb(0, 0, 255);
  color: red;
}
.descripcion{
  font-size: large;
}
.subtitulo {
  font-style: italic;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: medium;
  font-weight: 600;
}

.btn{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: red;
  border-radius: 20px;
  border: none;
  color: white;
  padding: 10px;
  text-decoration: none;
  display: flex;
  font-size: 14px;
  margin: 4px;
  cursor: pointer;
}
.btn:hover{
  background-color: rgb(0, 0, 255);
  color: rgb(255, 255, 255);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.div3 {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: span 5 / span 5;
  grid-column-start: 1;
  grid-row-start: 1;
  margin-top: 20px;
    

}
.div3 h1 {
    display: flex;
    width: auto;
    justify-content: center;
}
.lista{
  position: relative;
  z-index: 1;
  margin-left: 10px;
  margin-top: 0px;
}
.item{
  display: inline-block;
  position: relative;
  text-decoration: underline;
  animation: roll 8s ease 1s infinite backwards;
  z-index: 1;
}
.item:nth-child(1){
  color: rgb(255, 0, 0);
  animation-delay: 0s;
  opacity: 0;
}
.item:nth-child(2){
  color: blue;
  animation-delay: 2s;
}
.item:nth-child(3){
  color: greenyellow;
  animation-delay: 4s;
}
.item:nth-child(4){
  color: blueviolet;
  animation-delay: 6s;
}
@keyframes roll{
  0% {
    opacity: 0;
    transform: translate3d(0, -70%, 0);
  }
  2.5%, 25%{
    opacity: 1;
    transform: translatez(0);
  }
  27.5%, 100%{
    opacity: 0;
    transform: translate3d(0, 70%, 0);
  }
}
@keyframes show {
  from {
    opacity: 0;
    scale: 5%;
  }
  to{
    opacity: 100%;
    scale: 100%;
  }
}
footer{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: rgb(0, 0, 255);
  bottom: 0;
  height: 20%;
  width: 100%;
  position: sticky ;
  opacity: 0.8;
}
.footer {
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-content: space-around;
  bottom: 0;
  margin-left: 15px;
  margin-right: 15px;
}
.bi{
  color: white;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: white;
  color: black;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #121212;
  color: #f1f1f1;
}

.toggle-btn {
  top: 20px;
  right: 20px;
  padding:5px 5px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 999;
  display: flex;
  flex-direction: end;
}
.toggle-btn:hover {
  background-color: #555;
}
.carousel-item {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  gap: 10px;
  
}
.proyecto_1{
  height: 10%;
  width: 62%;
}
.proyecto_2{
  height: 10%;
  width: 60%;
}
.proyecto_3{
  margin-block: 30px;
  height: 10%;
  width: 60%;
}
.proyecto_4{
  margin-block: 30px;
  height: 10%;
  width: 60%;
}
h2 {
  margin-left: 10px;
  margin-top: 20px;
  font-size: 2rem;
  color: rgb(0, 0, 255);
  text-decoration: underline;
}
.card img{
  margin-top: 10px;
  width: 50%;
  height: 20%;
}



.buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
    border: transparent 1px solid;
    }

    .buttons button {
      padding: 10px 20px;
      border: none;
      border-radius: 8px;
      background-color: rgb(0, 0, 255);
      color: white;
      font-size: 12px;
      cursor: pointer;
      width: 100%;
      height: 100%;
    }
    .buttons button:hover {
      background-color: rgb(255, 0, 0, 0.6);
      color: white;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      transition: background-color 0.3s ease;
    }

    .projects {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
    }

    .card {
      width: 100%;
      height: 100%;
      border-radius: 10px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      overflow: hidden;
    }

    .carousel-container {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      width: 100%;
      height: 50%;
      overflow: hidden;
    }

    .carousel-container img {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 50%;
      height:100%;
      display: none;
    }

    .carousel-container img.active {
      display: block;
    }

    .carousel-buttons {
      position: absolute;
      top: 50%;
      width: 60%;
      display: flex;
      justify-content: space-between;
      transform: translateY(-50%);
    }

    .carousel-buttons button {
      background: rgb(0, 0, 255,0.3);
      color: white;
      border: none;
      padding: 5px 10px;
      cursor: pointer;
    }
    .carousel-buttons button:hover {
      background: rgb(255, 0, 0,0.4);
      color: white;
      border: none;
      padding: 5px 10px;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }

    .card-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 15px;
    }

    .card-content h3 {
      border-radius: 20px;
      background-color: rgb(38, 0, 255, 0.1);
      padding: 10px;
      color: rgb(0, 0, 255);
      margin: 0 0 10px;
    }
    .card-content h3:hover {
      color: rgb(38, 0, 255);
      color: red;
      transition: color 0.3s ease;
    }

.contacto-section{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin-top: 50px;
  margin-bottom: 55px;

}
.contact-form {
  display: flex;
  justify-content: center;
  width: 50%;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 20px;
  border-radius: 20px;
  border: 1px transparent rgb(0, 0, 255, 0.5);
  background-color: rgb(0, 0, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  gap: 10px;
  max-width: 400px;
  gap: 15px;
  margin: 30px;
}
.contacto-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-style: italic;
  font-weight: normal;
  font-size: 0.9rem;
}
.espacio {
  margin-top: 100px;
  margin-bottom: 20px;
}
#contact-form button.loading {
  background-color: #3498db;
  color: white;
  cursor: not-allowed;
}
#contact-form button.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}
#contact-form button:hover {
  background-color: #2980b9;
}
@keyframes spin{
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.marquee-container {
  margin-top: 50px;
  margin-bottom: 50px;
  width: 100%;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 13s linear infinite;
  font-size: 24px;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}
.marquee-container-right {
  margin-top: 50px;
  margin-bottom: 50px;
  width: 100%;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}
.marquee-text-right {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-right 13s linear infinite;
  font-size: 24px;
}
@keyframes scroll-right {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0%);
  }
}
